package com.example.myproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.myproject.model.SignLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.time.LocalDate;

@Mapper
public interface SignLogMapper extends BaseMapper<SignLog> {
    @Select("SELECT COUNT(*) FROM sign_log WHERE user_id = #{userId} AND sign_date = #{date}")
    int countSignInToday(Long userId, LocalDate date);
}